// #include"BSTree.hpp"
#include"BSTree2.hpp"
#include<vector>
int main()
{
  BSTree<int,int> bs;
  cout << bs.find(1)<<endl;
  vector<int> v{7,9,11,5,6,4,1};
  for(auto x:v)
  {
      bs.insert({x,x});
  }
  cout << "此时根节点为："<<bs.GetRootVal()<<endl;
  bs.inorder();

  cout << "删除9:"<<bs.erase(9)<<endl;
  bs.inorder();
  cout << "此时根节点为："<<bs.GetRootVal()<<endl;
  cout << "删除11:"<<bs.erase(11)<<endl;
  bs.inorder();
  cout << "删除4:"<<bs.erase(4)<<endl;
  bs.inorder();
  cout << endl;
  return 0;
}
